<?php

namespace app\admin\exception;

use think\Exception;

class DuplicateException extends Exception
{
    /**
     * DbException constructor.
     * @param string $message
     * @param array $config
     * @param string $sql
     * @param int $code
     */
    public function __construct($message, $duplicateData, $code = 5001001)
    {
        $this->message = $message;
        $this->code = $code;

        $this->setData('value', $duplicateData);
    }
}
